package STUDENT.TRANDAODAIVI.OOPs.Baitap_In_Poly_Ab;

import java.util.Scanner;

class DongVat{
	
	public void getGeneralInformation(){
		System.out.println("1");
		System.out.println("Co chan");
		System.out.println("Co mat");
		System.out.println("Co tai");
		System.out.println("Biet chay");
		System.out.println("Biet ngu");
	}
}
class Cho extends DongVat{
	public void getSpecificInformation(){
		System.out.println("2");
		System.out.println("Co duoi");
		System.out.println("Biet sua");
		System.out.println("Biet quay duoi");
	}
}
class Nguoi extends DongVat{
	public void getSpecificInformation(){
		System.out.println("2");
		System.out.println("Co tay");
		System.out.println("Biet noi");
		System.out.println("Biet khieu vu");
	}
}


public class BT2 {
public static void main(String[] args) {
	Scanner sc=new Scanner(System.in);
	Nguoi q1=new Nguoi();
	Cho q2=new Cho();
	System.out.print("Nhap doi tuong can xem: ");
	String temp=sc.nextLine();
	
	switch (temp){
	case "Nguoi": q1.getGeneralInformation();q1.getSpecificInformation();break;
	case "Cho": q2.getGeneralInformation();q2.getSpecificInformation();break;
	default: System.out.println("Khong co doi tuong nay");
	}
	
}
}

